package course;

<<<<<<< HEAD
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import course.view.DeanFrame;
import course.view.LoginFrame;
import course.view.StudentFrame;
import course.view.TeacherFrame;
import course.po.Course;
import course.po.Dean;
import course.po.Student;
import course.po.Teacher;
import course.service.impl.CourseServiceImpl;
import course.dao.impl.CourseDaoImpl;
import course.dao.impl.DeanDaoImpl;
import course.dao.impl.StudentDaoImpl;
import course.dao.impl.TeacherDaoImpl;
import course.controller.CourseControllerListener;
import course.dao.ICourseDao;
import course.dao.IDeanDao;
import course.dao.IStudentDao;
import course.dao.ITeacherDao;

public class Application {
	private static CourseServiceImpl courseService;

	public static void main(String[] args) {
		String stuNo = null;
//		  new CourseServiceImpl().getO();
		//  System.out.println(new CourseServiceImpl().getO());
//		  System.out.print(new CourseServiceImpl().getP());
//		  System.out.print(new CourseServiceImpl().getQ());
		LoginFrame loginFrame = new LoginFrame();
//		ArrayList<String>    list= new ArrayList<>();
//			list.add("1");
//			list.add("2");
//			System.out.println(list.contains("1"));
//        courseService = new CourseServiceImpl();
//        File f1 = new File("course.txt");
//		  try {
//		   Writer w = new FileWriter(f1);
		 
//		   w.write("你好");
//		   w.flush();
//		  }
//		  catch(IOException e) {
//		   e.printStackTrace();
//		  }
     //System.out.println(CourseControllerListener.getNameInput());
		//System.out.println(courseService.getNotSelectedCourse( "101"));
		//System.out.println(new CourseDaoImpl().getCourse("202103"));
		
//		CourseServiceImpl courseService = new CourseServiceImpl();
		//DeanFrame deanFrame = new DeanFrame();
       // StudentFrame stuFrame = new StudentFrame();
=======
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import course.view.LoginFrame;
import course.view.StudentFrame;
import course.view.TeacherFrame;
import course.po.Course;
import course.po.Dean;
import course.po.Student;
import course.po.Teacher;
import course.service.impl.CourseServiceImpl;
import course.dao.impl.CourseDaoImpl;
import course.dao.impl.DeanDaoImpl;
import course.dao.impl.StudentDaoImpl;
import course.dao.impl.TeacherDaoImpl;
import course.controller.CourseControllerListener;
import course.dao.ICourseDao;
import course.dao.IDeanDao;
import course.dao.IStudentDao;
import course.dao.ITeacherDao;

public class Application {
	public static void main(String[] args) {
	LoginFrame loginFrame = new LoginFrame();
//		CourseServiceImpl courseService = new CourseServiceImpl();
		
>>>>>>> refs/remotes/origin/master
		//TeacherFrame teacher = new TeacherFrame();
		//System.out.println(courseService.getCourse(5));
		//CourseControllerListener controllerListener = new CourseControllerListener();
		//System.out.println(controllerListener.getCourseService().findSelectedCourse(1).toString());
	    // new StudentFrame();
		//测试课程
		//ICourseDao courseDao = new CourseDaoImpl();
		//Course course = new Course(3,"选修课","C511","数据库llll","周三下午(5:00-6:00)-第四教学楼",2,"黄文玲",60,0);
		//Course course = courseDao.get(1);
		//courseDao.update(course);
		//courseDao.save(course);
		//System.out.println(course.toString());
		//courseDao.delete(3);
		//List<Course> list = courseDao.findAll();   //查询所有课程
		//for (Course course1 : list) {
		//	System.out.println(course1.toString());
		//}
		//测试学生
//		IStudentDao stuDao = new StudentDaoImpl();
		//Student stu = stuDao.get(1);
		//System.out.println(stu.toString());
//	   java.sql.Date sqlDate = null;
//		Date date = new Date();
//		try {
//			date = new SimpleDateFormat("yyyy-MM-dd").parse("2001-09-09");
//				
//		} catch (ParseException e) {
//			e.printStackTrace();
//		}
//		sqlDate = new java.sql.Date(date.getTime());
//		Student stu = new Student(3,"76","ll","女",sqlDate,"计算机",1,100);
		//stuDao.save(stu);
		//stuDao.update(stu);
		//stuDao.delete(3);
//		List<Student> list = stuDao.findAll();   
//		for (Student stu1 : list) {
//			System.out.println(stu1.toString());
//		}
		//测试教师
//		ITeacherDao teaDao = new TeacherDaoImpl();
//		System.out.println(teaDao.findTeaStu("t01"));
		//Student stu = stuDao.get(1);
		//System.out.println(stu.toString());
//	   java.sql.Date sqlDate = null;
//		Date date = new Date();
//		try {
//			date = new SimpleDateFormat("yyyy-MM-dd").parse("1995-09-09");
//				
//		} catch (ParseException e) {
//			e.printStackTrace();
//		}
//		sqlDate = new java.sql.Date(date.getTime());
//	Teacher tea = new Teacher(2,"7634","健康","女升",sqlDate,"计算机二级");
		//teaDao.save(tea);
	//	teaDao.update(tea);
		//teaDao.delete(3);
//		List<Student> s1 = new ArrayList<Student> ();
//		
//		s1 = teaDao.getStuNoGrade("20200102");
//		System.out.println(s1.toString());
//		for(Student t1: s1) {
//			
//		}
//		System.out.println(tea1.toString());
//		List<Teacher> list = teaDao.findAll();   
//		for (Teacher t1 : list) {
//			System.out.println(t1.toString());
//		}
		//测试教务员
//		IDeanDao dDao = new DeanDaoImpl();
		//Student stu = stuDao.get(1);
		//System.out.println(stu.toString());
//	   java.sql.Date sqlDate = null;
//	   Date date = new Date();
//		try {
//			date = new SimpleDateFormat("yyyy-MM-dd").parse("1995-09-09");
//				
//		} catch (ParseException e) {
//			e.printStackTrace();
//		}
//		sqlDate = new java.sql.Date(date.getTime());
//		Dean dea = new Dean(3,"54656","蓝色","男",sqlDate);
		//dDao.save(dea);
		//dDao.update(dea);
//		dDao.delete(3);
//		Dean d1 = new Dean();
//		d1 = dDao.get(1);
//		System.out.println(d1.toString());
//		List<Dean> list = dDao.findAll();   
//		for (Dean t1 : list) {
//			System.out.println(t1.toString());
//		}
	}
}
